/*
 * Copyright 2008 p.langer
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * 
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * 	http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package at.ac.tuwien.big.easyholdem.probsim;

/**
 * <p>
 * A set of probabilities for a Hold'em situation.
 * </p>
 * 
 * <p>
 * Created on 23.01.2008 at 14:07:36.
 * </p>
 * 
 * @author Philip Langer <langer[at]big[dot]tuwien[dot]ac[dot]at>
 */
public class HoldemProbability {

	// probabilities
	private double winningProbability;
	private double splitPotProbability;
	private double pairProbability;
	private double twoPairProbability;
	private double threeOfAKindProbability;
	private double straightProbability;
	private double flushProbability;
	private double fullHouseProbability;
	private double fourOfAKindProbability;
	private double straightFlushProbability;

	/**
	 * Creates a new set of probabilities.
	 * 
	 * @param winningProbability
	 *            probability to win.
	 * @param splitPotProbability
	 *            probability to split the pot.
	 * @param pairProbability
	 *            probability to make a pair.
	 * @param twoPairProbability
	 *            probability to make two pairs.
	 * @param threeOfAKindProbability
	 *            probability to make three of a kind.
	 * @param straightProbability
	 *            probability to make a straight.
	 * @param flushProbability
	 *            probability to make a flush.
	 * @param fullHouseProbability
	 *            probability to make a full house.
	 * @param fourOfAKindProbability
	 *            probability to make four of a kind.
	 * @param straightFlushProbability
	 *            probability to make a straight flush.
	 */
	public HoldemProbability(double winningProbability,
			double splitPotProbability, double pairProbability,
			double twoPairProbability, double threeOfAKindProbability,
			double straightProbability, double flushProbability,
			double fullHouseProbability, double fourOfAKindProbability,
			double straightFlushProbability) {
		super();
		this.winningProbability = winningProbability;
		this.splitPotProbability = splitPotProbability;
		this.pairProbability = pairProbability;
		this.twoPairProbability = twoPairProbability;
		this.threeOfAKindProbability = threeOfAKindProbability;
		this.straightProbability = straightProbability;
		this.flushProbability = flushProbability;
		this.fullHouseProbability = fullHouseProbability;
		this.fourOfAKindProbability = fourOfAKindProbability;
		this.straightFlushProbability = straightFlushProbability;
	}
	
	/**
	 * Default empty constructor.
	 * Just used for jax-ws compatibility.
	 */
	public HoldemProbability() {
		
	}

	/**
	 * Returns the probability to win.
	 * 
	 * @return the winning probability
	 */
	public double getWinningProbability() {
		return winningProbability;
	}

	/**
	 * Returns the probability to split the pot.
	 * 
	 * @return the split pot probability
	 */
	public double getSplitPotProbability() {
		return splitPotProbability;
	}

	/**
	 * Returns the probability to make a pair.
	 * 
	 * @return the pair probability
	 */
	public double getPairProbability() {
		return pairProbability;
	}

	/**
	 * Returns the probability to make two pair.
	 * 
	 * @return the two pair probability
	 */
	public double getTwoPairProbability() {
		return twoPairProbability;
	}

	/**
	 * Returns the probability to make three of a kind.
	 * 
	 * @return the three of a kind probability
	 */
	public double getThreeOfAKindProbability() {
		return threeOfAKindProbability;
	}

	/**
	 * Returns the probability to make a straight.
	 * 
	 * @return the straight probability
	 */
	public double getStraightProbability() {
		return straightProbability;
	}

	/**
	 * Returns the probability to make a flush.
	 * 
	 * @return the flush probability
	 */
	public double getFlushProbability() {
		return flushProbability;
	}

	/**
	 * Returns the probability to make a full house.
	 * 
	 * @return the full house probability
	 */
	public double getFullHouseProbability() {
		return fullHouseProbability;
	}

	/**
	 * Returns the probability to make four of a kind.
	 * 
	 * @return the four of a kind probability
	 */
	public double getFourOfAKindProbability() {
		return fourOfAKindProbability;
	}

	/**
	 * Returns the probability to make a straight flush.
	 * 
	 * @return the straight flush probability
	 */
	public double getStraightFlushProbability() {
		return straightFlushProbability;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "HoldemProbability: winning (" + getWinningProbability()
				+ "), splitPot (" + getSplitPotProbability() + "), pair ("
				+ getPairProbability() + "), twoPair("
				+ getTwoPairProbability() + "), threeOfAKind ("
				+ getThreeOfAKindProbability() + "), straight ("
				+ getStraightProbability() + "), flush ("
				+ getFlushProbability() + "), fullHouse ("
				+ getFullHouseProbability() + "), fourOfAKind ("
				+ getFourOfAKindProbability() + "), straightFlush ("
				+ getStraightFlushProbability() + ")";
	}

}
